package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EamenupartExt;
@SuppressWarnings("unchecked")
/**
 * eamenupart
 */
public class Eamenupart {
	/**
	 * PARTID
	 */
	public String pARTID;
	/**
	 * MENUID
	 */
	public String mENUID;
	/**
	 * CMPID
	 */
	public String cMPID;
	/**
	 * CMPTYPE
	 */
	public String cMPTYPE;
	/**
	 * REMARK
	 */
	public String rEMARK;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EamenupartExt DB = new EamenupartExt(); 
	
	public Eamenupart() {
		super();
	}
	
	public Eamenupart(String pARTID, String mENUID, String cMPID, String cMPTYPE, String rEMARK) {
		super();
		this.pARTID = pARTID; 
		this.mENUID = mENUID; 
		this.cMPID = cMPID; 
		this.cMPTYPE = cMPTYPE; 
		this.rEMARK = rEMARK; 
	}
	
	public String getPARTID() {
		return pARTID;
	}

	public void setPARTID(String pARTID) {
		this.pARTID = pARTID;
	} 
	
	public String getMENUID() {
		return mENUID;
	}

	public void setMENUID(String mENUID) {
		this.mENUID = mENUID;
	} 
	
	public String getCMPID() {
		return cMPID;
	}

	public void setCMPID(String cMPID) {
		this.cMPID = cMPID;
	} 
	
	public String getCMPTYPE() {
		return cMPTYPE;
	}

	public void setCMPTYPE(String cMPTYPE) {
		this.cMPTYPE = cMPTYPE;
	} 
	
	public String getREMARK() {
		return rEMARK;
	}

	public void setREMARK(String rEMARK) {
		this.rEMARK = rEMARK;
	} 
	
	
	public Map eamenupartToMap() {
		Map map = new HashMap();
		try {
			map.put("pARTID",this.pARTID);
			map.put("mENUID",this.mENUID);
			map.put("cMPID",this.cMPID);
			map.put("cMPTYPE",this.cMPTYPE);
			map.put("rEMARK",this.rEMARK);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Eamenupart mapToEamenupart(Map map){
		try {
			String pARTID =  map.get("pARTID").toString();
			String mENUID =  map.get("mENUID").toString();
			String cMPID =  map.get("cMPID").toString();
			String cMPTYPE =  map.get("cMPTYPE").toString();
			String rEMARK =  map.get("rEMARK").toString();
			Eamenupart eamenupart = new Eamenupart(pARTID, mENUID, cMPID, cMPTYPE, rEMARK);
			return eamenupart;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return eamenupartToMap().toString();
	}
	
	//方便数据操作	
	public Eamenupart insert(){
		return DB.insert(this);
	}
	public Eamenupart update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
